package io.kiki.sba.registry.server.metadata.bootstrap.config;

import org.springframework.beans.factory.annotation.Value;

import java.util.Collection;
import java.util.Map;


public class NodeConfigBeanProperty extends AbstractNodeConfigBean {

    @Value("#{PropertySplitter.mapOfKeyList('${nodes.localDataCenter:DefaultDataCenter}', '${nodes.metaNode:DefaultDataCenter:localhost}')}")
    private Map<String /*dataCenterId*/, Collection<String>> metaNode;

    @Value("${nodes.localDataCenter:DefaultDataCenter}")
    private String localDataCenter;

    @Override
    public Map<String, Collection<String>> getMetaNode() {
        return metaNode;
    }


    @Override
    public String getLocalDataCenter() {
        return localDataCenter;
    }
}
